<html>
<head><meta charset="utf-8"><title>Old versions of cargo can&#x27;t read the index · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html">Old versions of cargo can&#x27;t read the index</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220973860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973860">(Dec 26 2020 at 18:22)</a>:</h4>
<p>Is this intended behavior?</p>
<div class="codehilite"><pre><span></span><code>$ cargo +1.0.0 doc --verbose
[10] Invalid data in index - incorrect header version
</code></pre></div>
<p>if it helps, cargo build gives a very different error:</p>
<div class="codehilite"><pre><span></span><code>   Compiling inner v0.1.0 (file:///home/joshua/test-rustdoc/outer)
     Running `rustc /home/joshua/test-rustdoc/inner/src/lib.rs --crate-name inner --crate-type lib -g -C metadata=6b367980c0793cc6 -C extra-filename=-6b367980c0793cc6 --out-dir /home/joshua/test-rustdoc/outer/target/debug/deps --emit=dep-info,link -L dependency=/home/joshua/test-rustdoc/outer/target/debug/deps -L dependency=/home/joshua/test-rustdoc/outer/target/debug/deps`
info: syncing channel updates for &#39;1.0.0-x86_64-unknown-linux-gnu&#39;
info: downloading component &#39;rust&#39;
   Compiling outer v0.1.0 (file:///home/joshua/test-rustdoc/outer)
     Running `rustc src/lib.rs --crate-name outer --crate-type lib -g --out-dir /home/joshua/test-rustdoc/outer/target/debug --emit=dep-info,link -L dependency=/home/joshua/test-rustdoc/outer/target/debug -L dependency=/home/joshua/test-rustdoc/outer/target/debug/deps --extern inner=/home/joshua/test-rustdoc/outer/target/debug/deps/libinner-6b367980c0793cc6.rlib`
info: syncing channel updates for &#39;1.0.0-x86_64-unknown-linux-gnu&#39;
info: downloading component &#39;rust&#39;
src/lib.rs:1:9: 1:14 error: unresolved import `inner::Types`. Maybe a missing `extern crate inner`?
src/lib.rs:1 pub use inner::Types;
                     ^~~~~
error: aborting due to previous error
Could not compile `outer`.

Caused by:
  Process didn&#39;t exit successfully: `rustc src/lib.rs --crate-name outer --crate-type lib -g --out-dir /home/joshua/test-rustdoc/outer/target/debug --emit=dep-info,link -L dependency=/home/joshua/test-rustdoc/outer/target/debug -L dependency=/home/joshua/test-rustdoc/outer/target/debug/deps --extern inner=/home/joshua/test-rustdoc/outer/target/debug/deps/libinner-6b367980c0793cc6.rlib` (exit code: 101)
</code></pre></div>
<p>I think the only even moderately new feature I'm using is path dependencies - is there a way to replicate that with old versions of cargo? And I have no idea what's going wrong with <code>cargo doc</code>.</p>



<a name="220973915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973915">(Dec 26 2020 at 18:24)</a>:</h4>
<p>Does it work if you remove <code>~/.cargo/registry</code>?</p>



<a name="220973928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973928">(Dec 26 2020 at 18:25)</a>:</h4>
<p>It does not</p>



<a name="220973930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973930">(Dec 26 2020 at 18:25)</a>:</h4>
<p>removing all of .cargo to see if it helps</p>



<a name="220973932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973932">(Dec 26 2020 at 18:25)</a>:</h4>
<p>oh oops that got rid of the rustup shim lol</p>



<a name="220973973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973973">(Dec 26 2020 at 18:26)</a>:</h4>
<p>No, don't remove <code>.cargo/bin</code>! Oh, you noticed it...</p>



<a name="220973980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973980">(Dec 26 2020 at 18:26)</a>:</h4>
<p><code>rustup self update</code> fixes it I think.</p>



<a name="220973982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973982">(Dec 26 2020 at 18:26)</a>:</h4>
<div class="codehilite"><pre><span></span><code>rustup self update
-bash: /home/joshua/.local/lib/cargo/bin/rustup: No such file or directory
</code></pre></div>
<p><span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="220973983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973983">(Dec 26 2020 at 18:26)</a>:</h4>
<p>I'll reinstall, it's no big deal</p>



<a name="220973994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220973994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220973994">(Dec 26 2020 at 18:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can't.20read.20the.20index/near/220973930">said</a>:</p>
<blockquote>
<p>removing all of .cargo to see if it helps</p>
</blockquote>
<p>it did not help</p>



<a name="220974034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220974034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220974034">(Dec 26 2020 at 18:28)</a>:</h4>
<p>Can you grep for the error message in a checkout of rust 1.0.0?</p>



<a name="220974044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220974044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220974044">(Dec 26 2020 at 18:29)</a>:</h4>
<p>I can't currently as I am trying to build rustc + cg_clif for redox os, but barely have any disk space left.</p>



<a name="220974094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220974094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220974094">(Dec 26 2020 at 18:30)</a>:</h4>
<p>I am probably not going to spend much time on this, I replicated the rustdoc bug in 1.22 which is plenty old enough for me</p>



<a name="220974102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220974102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220974102">(Dec 26 2020 at 18:31)</a>:</h4>
<p>(<a href="https://github.com/rust-lang/rust/issues/80379">https://github.com/rust-lang/rust/issues/80379</a>)</p>



<a name="220974107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220974107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220974107">(Dec 26 2020 at 18:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can't.20read.20the.20index/near/220974034">said</a>:</p>
<blockquote>
<p>Can you grep for the error message in a checkout of rust 1.0.0?</p>
</blockquote>
<p>I can try to find the problem myself then.</p>



<a name="220975424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220975424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220975424">(Dec 26 2020 at 19:11)</a>:</h4>
<p>I'm able to build with 1.0 on Linux with registry dependencies, so I'm unsure what issue you ran into. (I think 1.11 is the oldest version that works on modern macos.)</p>
<p>It also looks like your example is missing an <code>extern crate</code>, or maybe a module?</p>



<a name="220975609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220975609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220975609">(Dec 26 2020 at 19:17)</a>:</h4>
<p>oh oops, added the <code>extern crate</code></p>



<a name="220975611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220975611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220975611">(Dec 26 2020 at 19:17)</a>:</h4>
<p>still breaks with <code>doc</code>, although <code>build</code> works now</p>



<a name="220975653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/220975653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#220975653">(Dec 26 2020 at 19:18)</a>:</h4>
<p>here is cargo.toml:</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[package]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s">"outer"</span>
<span class="n">version</span> <span class="o">=</span> <span class="s">"0.1.0"</span>
<span class="n">authors</span> <span class="o">=</span> <span class="k">["Joshua Nelson &lt;jyn514@gmail.com&gt;"]</span>
<span class="c1">#edition = "2018"</span>

<span class="c1"># See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html</span>

<span class="k">[dependencies]</span>
<span class="n">inner</span> <span class="o">=</span> <span class="p">{</span> <span class="n">path</span> <span class="o">=</span> <span class="s">"../inner"</span> <span class="p">}</span>
</code></pre></div>



<a name="221007039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Old%20versions%20of%20cargo%20can%27t%20read%20the%20index/near/221007039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Old.20versions.20of.20cargo.20can&#x27;t.20read.20the.20index.html#221007039">(Dec 27 2020 at 12:30)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> next time you can run <code>cargo new --edition 2015</code>, it should have better 1.0 compat</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>